package com.sunb2b.pojo;

public class Pager {
	private int page;
	private int pageSize;
	private int total;
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	
	public boolean isFirstPage(){
		return page==1;
	}
	
	public boolean isLastPgae(){
		return page==(Math.ceil(total/pageSize)-1);	
	}
	
	public int getLastPage(){
		return (int) (Math.ceil(total/pageSize)-1);
	}
	
}
